from applications.extensions import ma
from marshmallow import fields


# 用户models的序列化类
from applications.models import Dept


class EquipmentOutSchema(ma.Schema):
    id = fields.Integer()
    Name = fields.Str()
    Equid = fields.Str()
    Version = fields.Str()
    Equadmin = fields.Str()
    create_at = fields.DateTime()
    enable = fields.Integer()

class EquipmentOutCameras(ma.Schema):
    table_id = fields.Integer
    id = fields.Str()
    name = fields.Str()
    x = fields.Integer
    y = fields.Integer
    z = fields.Integer
    rx = fields.Integer
    ry = fields.Integer
    rz = fields.Integer
    ip = fields.Integer
    port = fields.Str()
    channel = fields.Integer
    username = fields.Str()
    password = fields.Str()
    rtsp = fields.Str()
    map_id = fields.Integer
    dept_id = fields.Integer
    dept_parent_name = fields.Str()
    dept_name = fields.Str()
